1. Field of the Invention
The present invention relates to an image decoding apparatus for reproducing moving image data that is provided through digital video tape on which the moving image data has been recorded. The present invention further relates to a recording medium which a computer can read from, and to a program which a computer can read. In particular, the present invention relates to a technology for enhancing commonality of circuits between such decoding apparatus for a digital video tape and a decoding apparatus for other media than digital video tape (hereinafter simply referred to as “MPEG decoding apparatus”).
2. Description of Background Art
Since the 1990s, digital video tape that can record moving image data thereon (hereinafter “DV tape”) has been adopted by a variety of video apparatuses, and is expected to continue being widely used in the video-related area. The format commonly used by DV tape is a digital video (DV) format standardized by the HD digital VTR association. In this DV format, encoding is performed using a hybrid encoding method which is a combination of discrete cosine transform (DCT) encoding and VLC (variable length coding) according to a relation in spatial axis direction. This stands in contrast to motion compensation prediction encoding which is performed according to a relation in time axis direction. The following is a description on how compressed moving image data is written on DV tape. FIG. 1 shows 10 tracks that constitute 1 frame of DV tape. Each track can record 135 number of synchronized blocks as shown in FIG. 1.
FIG. 2 shows an internal structure of a synchronized block. One synchronized block (Sync Block (SB)) has a fixed length of 80 bytes for example, and is divided into 6 fixed-length units. Among the 6 units, 4 fixed-length units each have a length of 14 bites, and each of the other 2 has a length of 10 bytes, for example. These 6 fixed-length units are used to store thereon macroblocks (MB) that have been standardized in accordance with a DV standard or with an MPEG standard. The method of storing MBs into fixed-length units is unique to the DV tape. An MB consists of 6 DCT blocks. There are two kinds of DCT blocks: luminance blocks and chrominance blocks. For example, in FIG. 3, the blocks named Y0, Y1, Y2, and Y3 are the luminance blocks, and the blocks named Cr and Cb are chrominance blocks. Hereinafter in this description, the term “compressed image data” or “variable length data” refers to a DCT block, each DCT block being used as a minimum unit in the operations. The blocks Y0-Cb are not only different in data length from the fixed-length unit, but also are different in data length from each other. Therefore, when storing these DCT blocks into the fixed-length units, it becomes necessary to perform preprocessing depending on the 3 possible patterns. The 3 patterns are (i) in which a fixed-length unit is larger in size than a DCT block, therefore an unused area will arise in the fixed-length unit, (ii) in which a DCT block is larger in size than a fixed-length unit, therefore a remaining part will arise for the DCT block, and (iii) in which a DCT block is the same size as a fixed-length unit. For the DV tape, when a DCT block does not fit into a fixed-length unit, arrangement is made so that the remaining part of the DCT block will be stored in an unused area of another fixed-length unit. Actual recording of DCT blocks on the DV tape is performed after such preprocessing has been done. This preprocessing assures to store each MB in a plurality of SBs, even if the data length is different for each DCT block. This enables to supply MBs to a reproduction apparatus for DV tape at a fixed rate in accordance with the rolling speed of DV tape.
Next, a conventional image decoding apparatus is described. A big difference between MPEG decoding apparatuses and image decoding apparatuses for decoding moving image data recorded on DV tape (hereafter “DV decoding apparatus”) is that DV decoding apparatuses performs reformatting processing. The central operation in this reformatting processing is to take out a remaining part from a fixed-length unit in which a DCT block and the remaining part of another DCT part have been stored, for example. In identifying the remaining part to be cut out, the DV decoding apparatus has to search for a boundary between the DCT block and another DCT block, both blocks being stored in one fixed-length unit. This boundary is identified by the code called “EOB (end of block)”. EOB is a code which shows that it is the end of a DCT block. In reformatting processing, an operation to search for EOB has to be done for each fixed-length unit. Although a load to be carried for one search is not much, this search has to be executed for each of an enormous number of MBs constituting a moving image, which will end up with quite a load. In order to enhance the speed of this reformatting processing, DV decoding apparatuses are equipped with a memory for storing a plurality of SBs, a dedicated circuit for executing the above-mentioned search operation, and the like.
However, the fact that a DV decoding apparatus has to have such dedicated circuit for reformatting processing works as an impediment against enhancing a commonality between a MPEG decoding apparatus. That is, moving image data that is provided through a medium such as a DVD, an HD, and a digital broadcast, and the like, is not usually converted into the mentioned format that is used for DV tapes, and thus such moving image need not to be performed reformatting processing. It is not preferable that MPEG decoding apparatuses which mainly decode such moving image data to be equipped with such dedicated circuit since it increases the production cost. However, reformatting processing through software, not using a dedicated circuit, impose a great deal of burden on MPEG decoding apparatuses.
In view of the above problem, producers of video-related apparatus are reluctant to commercialize image decoding apparatuses with decoding functions that can deal with both of the DV tape and the DVD·HD, even if it is the market needs. However, apparatuses such as a video camera that performs recording/reproducing in relation to DV, a drive apparatus that reads MPEG streams from a DVD, and a set top box that receives a digital broadcast are equipped with an IEEE1394 interface, and have achieved commonality of input/output interfaces for moving image data. From a the market point of view, it is a simple question why the development is impossible for an image decoding apparatus that has a decoding function for both the DVD and the HD, considering the fact that the interface-commonality has been already achieved. In light of market demands, its cost aspect is no more a good excuse for producers of video-related apparatuses, and it has become an urgent agenda for the producers to develop such image decoding apparatus.